Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unified-latex/unified-latex-util-render-info

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unified-latex/unified-latex-util-render-info

Functions for modifying a unified-latex AST

  • 1.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-37.28%
Maintainers
0
Weekly downloads
 
Created
Source

unified-latex-util-render-info

What is this?

Functions to help modify the _renderInfo of a unified-latex Abstract Syntax Tree (AST).

When should I use this?

If you want to compare the structure of an AST without position information or extra information that is kept for pretty-printing, these functions can be used to remove/modify the _renderInfo of an Ast.Node.

Install

npm install @unified-latex/unified-latex-util-render-info

This package contains both esm and commonjs exports. To explicitly access the esm export, import the .js file. To explicitly access the commonjs export, import the .cjs file.

Functions

trimRenderInfo(ast)

Removes any _renderInfo and position tags present in the AST. This operation is destructive.

function trimRenderInfo<T extends Ast.Ast>(ast: Ast.Ast): T;

Parameters

ParamType
astAst.Ast

updateRenderInfo(node, renderInfo)

Updates the ._renderInfo property on a node to include whatever has been supplied to renderInfo. If renderInfo is null, no update is performed.

This operation mutates node

function updateRenderInfo(
  node: Ast.Node | Ast.Argument,
  renderInfo: {}
): Ast.Node | Ast.Argument;

Parameters

ParamType
nodeAst.Node | Ast.Argument
renderInfo{}

Keywords

FAQs

Package last updated on 22 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc